package Task15;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int n = scanner.nextInt();
            int count = 0;
            for (int i = 0; i < 32; i++) {
                if(((n>>i) & 1) == 1){
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}
